package com.线程和进程.生产者和消费者;

public class Customer implements Runnable {
    private Box b;

    public Customer(Box b) {
        this.b = b;
    }//实现Runnable接口

    //重写run方法，调用获取牛奶的操作
    public void run() {
        while (true) {
            b.get();
        }
    }
}
